#pragma once
#include <pcl/point_types.h>
#include <pcl/point_cloud.h>
#include <pcl/io/pcd_io.h>    // pcd相关头文件
#include <pcl/point_types.h>  // 所有点类型定义头文件
#include <pcl/io/ply_io.h>    // ply类相关头文件
template<typename PointType>
class IoUtils{
    using CloudPtrType  = typename pcl::PointCloud<PointType>::Ptr;
public:
    static CloudPtrType loadPointFromFile(const std::string & file_path){
        CloudPtrType  cloud (new pcl::PointCloud<PointType>);
	    if (pcl::io::loadPCDFile<PointType>(file_path, *cloud) == -1){
            std::cout << "Cloud reading failed." << std::endl;
        }
        return  cloud;
    }
};